Skip to content

Conversation

@trianglesphere
Copy link
Contributor

If a user only specifies the min block number, the max block number is set to the current block number + MAX_BLOCK_RANGE_BLOCKS; however, there is no check that the min block is less than the newly set max block number.

…GE_BLOCKS

If a user only specifies the min block number, the max block number is set to the
current block number + MAX_BLOCK_RANGE_BLOCKS; however, there is no check that
the min block is less than the newly set max block number.
if let Some(block_number_min) = bundle.block_number_min {
if block_number_min > bundle.block_number_max.unwrap() {
return Err(
EthApiError::InvalidParams("block_number_min is too high".into()).into(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be helpful to return the block_number_min and block_number_max in the error message

@ferranbt ferranbt merged commit 1dcac5f into flashbots:main Jun 6, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants